package com.hahehiho.myalbum;

import java.util.Calendar;

public class MyAlbumVO {
	private int pKey;
	private String filePath = "";
	private Calendar orgDate;
	private int orgDateYear;
	private int orgDateMonth;
	private int orgDateDay;
	private int count;
	private String[] addrs;
	private String fullAddr = "";
	
	private String xpTitle = "";
	private String xpKeywords = "";
	private String xpSubject = "";
	private String xpComment = "";
	private double latitude;
	private double longitude;
	private boolean isGPS;
	
	public MyAlbumVO() {
		addrs = new String[0];
	}

	public static void main(String[] args) {
		// TODO Auto-generated method stub

	}

	public String getFilePath() {
		return filePath;
	}

	public void setFilePath(String filePath) {
		this.filePath = filePath;
	}

	public Calendar getOrgDate() {
		return orgDate;
	}

	public void setOrgDate(Calendar orgDate) {
		this.orgDate = orgDate;
	}

	public int getOrgDateYear() {
		return orgDateYear;
	}

	public void setOrgDateYear(int orgDateYear) {
		this.orgDateYear = orgDateYear;
	}

	public int getOrgDateMonth() {
		return orgDateMonth;
	}

	public void setOrgDateMonth(int orgDateMonth) {
		this.orgDateMonth = orgDateMonth;
	}

	public int getOrgDateDay() {
		return orgDateDay;
	}

	public void setOrgDateDay(int orgDateDay) {
		this.orgDateDay = orgDateDay;
	}

	public int getCount() {
		return count;
	}

	public void setCount(int count) {
		this.count = count;
	}
	
	public String getUrlFile() {
		String url = "http://hahehiho.iptime.org/webdav/";
		
		url += getFilePath().replace("/media/MGTEC/Picture", "Picture");
		
		return url;
	}

	public String getThumbNailFile() {
		String url = "http://hahehiho.iptime.org/webdav/";
		
		url += getFilePath().replace("/media/MGTEC/Picture", "Picture.t");
		
		return url;
	}

	public void setAddrs(String[] resultAddrs) {
		addrs = resultAddrs;
	}
	
	public String[] getAddrs() {
		return addrs;
	}

	public String getFullAddr() {
		return fullAddr;
	}

	public void setFullAddr(String fullAddr) {
		if(fullAddr == null)
			fullAddr = "";
		this.fullAddr = fullAddr;
	}

	public int getpKey() {
		return pKey;
	}

	public void setpKey(int pKey) {
		this.pKey = pKey;
	}

	public String getXpTitle() {
		return xpTitle;
	}

	public void setXpTitle(String xpTitle) {
		if(xpTitle == null)
			xpTitle = "";
		this.xpTitle = xpTitle;
	}

	public String getXpKeywords() {
		if(xpTitle == null)
			xpTitle = "";
		return xpKeywords;
	}

	public void setXpKeywords(String xpKeywords) {
		if(xpKeywords == null)
			xpKeywords = "";
		this.xpKeywords = xpKeywords;
	}

	public String getXpSubject() {
		return xpSubject;
	}

	public void setXpSubject(String xpSubject) {
		if(xpSubject == null)
			xpSubject = "";
		this.xpSubject = xpSubject;
	}

	public String getXpComment() {
		return xpComment;
	}

	public void setXpComment(String xpComment) {
		if(xpComment == null)
			xpComment = "";
		this.xpComment = xpComment;
	}

	public void setLatitude(double latitude) {
		this.latitude = latitude;
	}

	public void setLongitude(double longitude) {
		this.longitude = longitude;
		
	}
	
	public String toString() {
		StringBuffer bf = new StringBuffer();
		
		bf.append("pKey : " + pKey + "\n");
		bf.append("filePath : " + filePath + "\n");
		bf.append("orgDate : " + orgDate + "\n");
		bf.append("orgDateYear : " + orgDateYear+ "\n");
		bf.append("orgDateMonth : " + orgDateMonth+ "\n");
		bf.append("orgDateDay : " + orgDateDay+ "\n");
		bf.append("count : " + count+ "\n");
		for(int i = 0; i < addrs.length; i++)
			bf.append("addrs[" + i + "] : " + addrs[i] + "\n");
		bf.append("fullAddr :  "+ fullAddr+ "\n");
		
		bf.append("xpTitle : "+ xpTitle+ "\n");
		bf.append("xpKeywords : "+ xpKeywords+ "\n");
		bf.append("xpSubject : "+ xpSubject+ "\n");
		bf.append("xpComment : "+ xpComment+ "\n");
		bf.append("latitude : "+ latitude + "\n");
		bf.append("longitude : "+ longitude+ "\n");
		
		
		return bf.toString();
	}

	public double getLatitude() {
		return latitude;
	}

	public double getLongitude() {
		return longitude;
	}

	public boolean isGPS() {
		return isGPS;
	}

	public void setIsGPS(boolean isGPS) {
		this.isGPS = isGPS;
	}

}
